<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$is_language?'登錄':'Login'}</title>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/weui.min.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/jquery-weui.css">
    <link rel="stylesheet" href="__MODULE_LIBS__/css/demos.css">
    <script src="__MODULE_LIBS__/js/jquery-2.1.4.js"></script>
    <script src="__MODULE_LIBS__/js/fastclick.js"></script>
    <script src="__MODULE_LIBS__/js/jquery-weui.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html {
            width: 100%;
            /*height: 100%;*/
            font-size: 20px;
            font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo;
            background: #F3F3F3;
        }

        body {
            position: relative;
            margin: 0 auto;
            max-width: 750px;
            font-size: 0.8rem;
            background: url('http://cdn.mogo.club/f775d4db751d138b0bd7d03876f4d917.png') no-repeat;
            background-size: 100% 100%;
        }

        .navbar {
            position: relative;
            width: 100%;
            height: 2rem;
            font-size: 16px;
            color: #fff;
            line-height: 2rem;
            background: #373553;
        }

        .navbar-item {
            position: absolute;
            left: 0;
            top: 0;
            display: block;
            width: 3.2rem;
            height: 2rem;
            font-size: 14px;
            color: #fff;
            text-align: center;
        }

        .navbar-item > img {
            width: 0.8rem;
            height: 0.7rem;
            vertical-align: middle;
        }

        .navbar-center {
            text-align: center;
        }

        .content {
            width: 100%;
        }

        .alading {
            padding-top: 3rem;
            font-size: 1rem;
            color: #333;
            font-weight: bold;
        }

        .loginForm {
            padding-top: 3rem;
        }

        .weui-cells {
            position: relative;
            margin-left: auto;
            margin-right: auto;
            margin-top: 0rem;
            /*width: 94%;*/
            font-size: 0.8rem;
            background-color: transparent;
            border-radius: 0.3rem;
        }

        .weui-cells:before {
            border-top: none;
        }

        .weui-cells:after {
            border: none;
        }

        .weui-cell {
            padding: 0.6rem 0.4rem;
        }

        .weui-label {
            width: 2.4rem;
        }

        .weui-label > img {
            width: 1.0rem;
        }

        input::placeholder {
            font-size: 0.7rem;
            color: #BBBBBB;
        }

        /*谷歌的兼容写法*/
        input::-webkit-input-placeholder {
            font-size: 0.7rem;
            color: #BBBBBB;
        }

        /*火狐的兼容写法*/
        input::-moz-placeholder {
            font-size: 0.7rem;
            color: #BBBBBB;
        }

        .weui-input {
            color: #333;
        }

        .rg {
            margin: 0.3rem auto;
            width: 93%;
            text-align: right;
        }

        .rg > a {
            display: inline-block;
            width: 3rem;
            height: 1.2rem;
            line-height: 1.2rem;
            font-size: 0.7rem;
            color: #bbbbbb;
        }

        .login-btn {
            margin-top: 1rem;
            background: #fff;
        }

        .btn {
            width: 100%;
            border: 0;
            outline: 0;
            -webkit-appearance: none;
            background: #fff;
            background-image: url("http://cdn.mogo.club/65ec166188f9e91af12a5f4ef914b442.png");
            background-size: 100% 100%;
            background-position: center;
            height: 90px;
        }
        .btn1 {
            width: 100%;
            border: 0;
            outline: 0;
            -webkit-appearance: none;
            background: #fff;
            background-image: url("http://cdn.mogo.club/63b443efd50c9b896ac0ab87b011b63d.png");
            background-size: 100% 100%;
            background-position: center;
            height: 90px;
        }
        .bg-w {
            width: 90%;
            margin: 0 auto;
            background: #fff;
            margin-top: 16%;
            border-radius: 26px;
        }
        @media only screen and (max-width: 320px) {
            .bg-w {
                margin-top: 8%;
            }
            .loginForm {
                padding-top: 1rem;
            }
            .alading {
                padding-top: 1rem;
            }
        }
        .weui-cell {
            border-bottom: 1px solid;
        }
    </style>
</head>
<body>
<header class="navbar">
    <!--<a href="{:url('login/is_language')}" class="navbar-item">-->
        <!--<img src="__MODULE_LIBS__/img/back.png"/>&nbsp;{$is_language?'返回':'Return'}-->
    <!--</a>-->
    <div class="navbar-center">{$is_language?'登錄':'Login'}</div>
    <div class="navbar-item1">
        <select name="" id="yy">
            <option value="1" {$is_language?'selected':''}>中文</option>
            <option value="0" {$is_language?'':'selected'}>English</option>
        </select>
    </div>
</header>
<div class="content">
    <div class="weui-cells" style="display: flex;align-items:center;margin-top: 20px;padding: 0 5%">
        <img src="http://cdn.mogo.club/b6fc975622c610e53dc6b0cedb0c6463.png" alt="" style="margin-right: 10px;width: 27px;"/>
        <span style="display: flex;align-items: center;color: #fff;">{$is_language?'HGB':'HGB'}</span>
    </div>
    <div class="bg-w">
        <div style="width: 90%;margin: 0 auto;">
            <p class="alading">會員登錄</p>
            <p style="color: #8E8E8E;">MEMBER LOGIN</p>
            <form action="" method="post" class="loginForm">
                <div class="weui-cells weui-cells_form">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">
                                <img src="http://cdn.mogo.club/a3dc938cb0a79fb97379eb42b86fee62.png">
                            </label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="text"
                                   placeholder="{$is_language?'請輸入您的賬號':'Please enter your account number'}" name="username"
                                   id="number">
                        </div>
                    </div>
                </div>
                <div class="weui-cells weui-cells_form">
                    <div class="weui-cell">
                        <div class="weui-cell__hd">
                            <label class="weui-label">
                                <img src="http://cdn.mogo.club/47a7e06fa8e3d2288129c6e226bac8d8.png">
                            </label>
                        </div>
                        <div class="weui-cell__bd">
                            <input class="weui-input" type="password"
                                   placeholder="{$is_language?'請輸入您的密碼':'Please input your password'}" name="password" id="pwd">
                        </div>
                    </div>
                </div>
                <p class="rg"><a href="{:url('register')}">{$is_language?'註冊':'Register'}</a></p>
                {$is_language?'<input class="btn" type="submit" value="" style="width: 100%;">':'<input class="btn1" type="submit" value="" style="width: 100%;">'}
            </form>
        </div>
    </div>
</div>


<script type="text/javascript">
    $(function () {
        FastClick.attach(document.body);
    })
    $(document).on("change",'select#yy',function(){
        var yy = $(this).val();
        console.log(yy)
        var url = "{:url('base/is_language')}";
        $.post(url,{language:yy},function (res) {
            window.location.reload();
        })
    });
    //获取设备高度（软键盘调出来时高度也会变小，所以在点击事件前获取）
    var deviceH = document.documentElement.clientHeight + "px";
    //表单获得焦点后动态改变body和背景图片的大小
    $('.weui-input').bind("click", function () {
        $("html").attr("style",
            "height:" + deviceH + ";background-size: 100%" + deviceH);
    });
</script>

</body>
</html>
